<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="UTF-8">
    <title>知识点展示</title>
    <style>
        * { margin: 0; padding: 0; box-sizing: border-box; }
        :root {
            --bg-color: #f5f7fa;
            --text-color: #2c3e50;
            }
        body {
            font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
            height: 100vh;
            display: flex;
            justify-content: center;
            align-items: center;
            background-color: {{bg_color}};
            color: {{text_color}};
            overflow: hidden;
        }
        .container {
            width: 80%;
            max-width: 800px;
            text-align: center;
        }
        .title {
            font-size: 3.5rem;
            margin-bottom: 2rem;
            opacity: 0;
        }
        .content {
            font-size: 2.2rem;
            line-height: 1.6;
            opacity: 0;
        }
        
        /* 动画效果 */
        .fadeIn { animation: fadeIn 2s forwards; }
        @keyframes fadeIn { to { opacity: 1; } }
        
        .slideUp { animation: slideUp 1.5s forwards; }
        @keyframes slideUp {
            from { transform: translateY(100px); opacity: 0; }
            to { transform: translateY(0); opacity: 1; }
        }
        
        .zoomIn { animation: zoomIn 2s forwards; }
        @keyframes zoomIn {
            from { transform: scale(0.5); opacity: 0; }
            to { transform: scale(1); opacity: 1; }
        }
        
        .rotate3d { animation: rotate3d 2.5s forwards; }
        @keyframes rotate3d {
            from { transform: rotate3d(1,1,0,180deg); opacity: 0; }
            to { transform: rotate3d(0,0,0,0); opacity: 1; }
        }
        
        .typewriter {
            overflow: hidden;
            border-right: .15em solid {{text_color}};
            white-space: nowrap;
            animation: 
                typing 3.5s steps(40, end) forwards,
                blink-caret .75s step-end infinite;
        }
        @keyframes typing {
            from { width: 0; opacity: 1; }
            to { width: 100%; opacity: 1; }
        }
        @keyframes blink-caret {
            from, to { border-color: transparent; }
            50% { border-color: {{text_color}}; }
        }
    </style>
</head>
<body data-bg-color="{{ bg_color|default('#ffffff') }}" data-text-color="{{ text_color|default('#333333') }}">
    <div class="container">
        <h1 class="title {{animation_type}}">{{title}}</h1>
        <div class="content {{animation_type}}">{{content}}</div>
        <img src="{{ image_url }}">
    </div>

    <script>
        
        // 页面停留5秒后自动跳转
        setTimeout(() => {
            window.location.href = "{{next_page}}";
        }, 5000);
    </script>
</body>
</html>